package part1;

public class Dog implements Comparable<Dog>{
    int food;

    public Dog(int food) {
        this.food = food;
    }

    @Override
    public String toString() {
        return "Part01.Dog{" +
                "food=" + food +
                '}';
    }

    @Override
    public int compareTo(Dog o) {
        return Integer.compare(this.food, o.food);
    }
}
